package com.sdhs.businessfile.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.sdhs.businessfile.domain.BusinessFile;
import com.sdhs.businessfile.domain.dto.BusinessFileDTO;

/**
 * 业务附件Mapper接口
 *
 * @author mz
 * @date 2024-07-30
 */
public interface BusinessFileMapper {
    /**
     * 查询业务附件
     *
     * @param id 业务附件主键
     * @return 业务附件
     */
    public BusinessFile selectBusinessFileById(Long id);

    /**
     * 查询业务附件列表
     *
     * @param businessFile 业务附件
     * @return 业务附件集合
     */
    public List<BusinessFile> selectBusinessFileList(BusinessFileDTO businessFile);

    /**
     * 新增业务附件
     *
     * @param businessFile 业务附件
     * @return 结果
     */
    public int insertBusinessFile(BusinessFile businessFile);

    /**
     * 修改业务附件
     *
     * @param businessFile 业务附件
     * @return 结果
     */
    public int updateBusinessFile(BusinessFile businessFile);

    /**
     * 删除业务附件
     *
     * @param id 业务附件主键
     * @return 结果
     */
    public int deleteBusinessFileById(Long id);

    /**
     * 批量删除业务附件
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteBusinessFileByIds(Long[] ids);
    
    public int deleteByBusinessTypeAndId(@Param("businessType") String businessType, @Param("businessId") String businessId);
    
    public int deleteUserFileByBusinessTypeAndId(
    		@Param("businessType") String businessType, @Param("businessId") String businessId, @Param("userName") String userName);
    
    public int insertBusinessFileBatch(@Param("list") List<BusinessFile> list);
    
}